<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
                xmlns:s="http://jboss.com/products/seam/taglib"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:rich="http://richfaces.org/rich"
                xmlns:a="http://richfaces.org/a4j">
               
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />   
<head>
	<style type="text/css">
		.fontStyle {
			font-family: "宋体";
			font-size:15px;
		}
	</style>
</head> 
<body>
 <rich:panel> 
 		<div class = "fontStyle">
    	<f:facet name="header">添加商品图片</f:facet>
        <h:form id="AddProductForm" styleClass="register" enctype="multipart/form-data">
            <div>
               <h:panelGrid columns="2" rendered = "#{canAddImage}">
               		<h:outputLabel value = "商品#{newProduct.productCode}的图片"><em>*</em></h:outputLabel> 					
					<s:fileUpload data="#{addProduct.data}" fileName="#{productPicture.pictureUrl}" accept="gif,jpg,jpeg,png" />	
					
					<h:outputLabel value = "图片描述"><em>*</em></h:outputLabel> 
					<h:inputTextarea value="#{productPicture.descript}" />
					
					<h:outputLabel value = "图片显示优先级"><em>*</em></h:outputLabel> 
					<h:inputText value="#{productPicture.pictureOrder}" />
					
        	   </h:panelGrid>
        	</div>
        	<h:commandButton  value = "添加图片" action="#{addProduct.addPicture}" rendered = "#{canAddImage}"/>	
        	<s:button  value = "继续添加图片" action="#{addProduct.startAddPicture}" rendered = "#{!canAddImage}"/>
        	<s:button  value = "去添加商品库存" action="#{addProduct.complete}" rendered = "#{!canAddImage}" />		
        	    			  
            
        </h:form>
       </div>
    </rich:panel>


</body>

</html>